<?php
/**
 * CommentList
 * @author yulipu
 */
if(!defined('THINK_PATH')) exit;

class CommentListWidget extends Widget {
	public function render($data) {
		$articleid = $data['articleid'];
		
		$data = array();
		$rs = D('Comment')->getListByPage($articleid);
		
		$data['pageString'] = $rs['pageString'];
		unset($rs['pageString']);
		$data['dataList'] = $rs;
		
		$content = $this->renderFile(LIB_PATH.'Widget/CommentList.html', $data);
	
		return $content;
	} 
}

